using System;
using XmlStudio.DataLayer;

namespace XmlStudio.Models.Events {
    /// <summary>
    /// Wrapper for event arguments for NodeExpandedEventHandler delegate.
    /// </summary>
    public class NodeExpandedEventArgs<TNode> : EventArgs
        where TNode : BigXmlNode {
        private TNode node;

        /// <summary>
        /// Initializes a new instance of the <see cref="NodeExpandedEventArgs{TNode}"/> class.
        /// </summary>
        /// <param name="node">Reference to the <see cref="BigXmlNode"/> instance.</param>
        public NodeExpandedEventArgs(TNode node) {
            this.node = node;
        }

        /// <summary>
        /// Gets the node associated with current <see cref="NodeExpandedEventArgs{TNode}"/> instance.
        /// </summary>
        public TNode Node {
            get { return this.node; }
        }
    }
}
